import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'
import mine from '@/components/mine'
import dongtai from '@/components/dongtai'
import workbench from '@/components/workbench'
import login from '@/components/login'
import g11 from '@/page/g11'
import g24 from '@/page/g24'
import g25 from '@/page/g25'
import g26 from '@/page/g26'
import g12 from '@/page/g12'
import g14 from '@/page/g14'
import g13 from '@/page/g13'
import g15 from '@/page/g15'
import g16 from '@/page/g16'
import g16_1 from '@/page/g16.1'
import g17 from '@/page/g17'
import g21 from '@/page/g21'
import g22 from '@/page/g22'
import g23 from '@/page/g23'
import g28 from '@/page/g28'
import m4 from '@/page/m4'
import m5 from '@/page/m5'
import m6 from '@/page/m6'
import m7 from '@/page/m7'
import m7_1 from '@/page/m7.1'
import m7_1_1 from '@/page/m7.1.1'
import g24_1 from '@/page/g24.1'
import m3 from '@/page/m3'
import g31 from '@/page/g31'
import g15_1 from '@/page/g15.1'
import userInfo from '@/page/userInfo'
import selectCity from '@/components/selectCity'
import selectProvince from '@/components/selectProvince'
import selectArea from '@/components/selectArea'
import radio from '@/components/radio'
import cropper from '@/components/cropper'
import feedDetail from '@/components/feedDetail'
import classDetail from '@/components/classDetail'
import teacherDetail from '@/components/teacherDetail'
import studentDetail from '@/components/studentDetail'
import selectStudent from '@/components/selectStudent'
import selectTeacher from '@/components/selectTeacher'
import selectService from '@/components/selectService'
import qiandaolist from '@/components/qiandaolist'
import dianping from '@/components/dianping'
import heightWeight from '@/components/health/heightWeight'
import eye from '@/components/health/eye'
import temperature from '@/components/health/temperature'
import topingjia from '@/components/topingjia'
import CommingSoon from '@/components/CommingSoon'
import todayCount from '@/components/todayCount'
Vue.use(Router)

export default new Router({
    routes: [{
            path: '/',
            name: 'index',
            component: index,
            children: [{ //工作台
                path: '/workbench',
                name: 'workbench',
                component: workbench
            }, {
                path: '/dongtai',
                name: 'dongtai',
                meta: { header: '动态', noback: 1 },
                component: dongtai
            }, {
                path: '/mine',
                name: 'mine',
                meta: { header: '我的', noback: 1 },
                component: mine
            }]
        }, {
            path: '/login',
            name: 'login',
            meta: {},
            component: login
        }, {
            path: '/g11',
            name: 'g11',
            component: g11
        }, {
            path: '/g25',
            name: 'g25',
            meta: { header: '历史点评' }, //作业点评的
            component: g25
        }, {
            path: '/g26',
            name: 'g26',
            meta: { header: '历史点评' }, //事件点评的
            component: g26
        }, {
            path: '/g24',
            name: 'g24',
            component: g24
        }, {
            path: '/g12', //班级管理
            name: 'g12',
            component: g12
        }, {
            path: '/g14', //学生管理
            name: 'g14',
            component: g14
        }, {
            path: '/g13', //教师管理
            name: 'g13',
            component: g13
        }, {
            path: '/g15', //课程管理
            name: 'g15',
            component: g15
        }, {
            path: '/g21', //午托点名
            name: 'g21',
            component: g21
        }, {
            path: '/g22', //晚托点名
            name: 'g22',
            component: g22
        }, , {
            path: '/g23', //课程点名
            name: 'g23',
            component: g23
        }, {
            path: '/selectProvince',
            name: 'selectProvince',
            meta: { header: '选择省份' },
            component: selectProvince
        }, {
            path: '/selectCity',
            name: 'selectCity',
            meta: { header: '选择城市' },
            component: selectCity
        }, {
            path: '/selectArea',
            name: 'selectArea',
            meta: { header: '选择区' },
            component: selectArea
        }, {
            path: '/radio', //单选
            name: 'radio',
            component: radio
        }, {
            path: '/userInfo', //修改用户信息
            name: 'userInfo',
            component: userInfo
        }, {
            path: '/cropper', //切割图片
            name: 'cropper',
            component: cropper
        }, {
            path: '/m5',
            name: 'm5',
            meta: { header: '增值服务' },
            component: m5,
        }, {
            path: '/m6',
            name: 'm6',
            meta: { header: '我的服务' },
            component: m6,
        }, {
            path: '/m7',
            name: 'm7',
            meta: { header: '设置' },
            component: m7,
        }, {
            path: '/m7_1', //意见反馈
            name: 'm7_1',
            component: m7_1,
        }, {
            path: '/m7_1_1', //反馈记录
            name: 'm7_1_1',
            component: m7_1_1,
        }, {
            path: '/feedDetail', //反馈记录详情
            name: 'feedDetail',
            meta: { header: '反馈详情' },
            component: feedDetail,
        }, {
            path: '/classDetail', //班级详情
            name: 'classDetail',
            component: classDetail,
        }, {
            path: '/teacherDetail', //教师详情
            name: 'teacherDetail',
            component: teacherDetail,
        }, {
            path: '/studentDetail', //学生详情
            name: 'studentDetail',
            component: studentDetail,
        }, {
            path: '/g15_1', //课程详情,新增或编辑课程
            name: 'g15_1',
            component: g15_1,
        }, {
            path: '/g16',
            name: 'g16',
            meta: { header: '缴费提醒' },
            component: g16,
        }, {
            path: '/g16_1', //缴费提醒详情
            name: 'g16_1',
            meta: { header: '详情' },
            component: g16_1,
        }, {
            path: '/g17',
            name: 'g17',
            meta: { header: '健康管理' },
            component: g17,
        }, { //选择学生
            path: '/selectStudent',
            name: 'selectStudent',
            component: selectStudent,
        }, { //选择老师
            path: '/selectTeacher',
            name: 'selectTeacher',
            component: selectTeacher,
        }, { //选择服务
            path: '/selectService',
            name: 'selectService',
            component: selectService,
        }, {
            path: '/qiandaolist', //签到详情列表
            name: 'qiandaolist',
            component: qiandaolist,
        }, {
            path: '/dianping', //点评
            name: 'dianping',
            component: dianping
        },
        {
            path: '/heightWeight', //身高体重
            name: 'heightWeight',
            component: heightWeight,
        }, {
            path: '/eye', //视力检测
            name: 'eye',
            component: eye,
        }, { //体温
            path: '/temperature',
            name: 'temperature',
            component: temperature,
        }, { //新增食谱
            path: '/g24_1',
            name: 'g24_1',
            component: g24_1,
        }, { //修改密码
            path: '/m3',
            name: 'm3',
            component: m3,
        }, { //在校情况
            path: '/g31',
            name: 'g31',
            meta: { header: '到校情况' },
            component: g31,
        }, { //家长端健康管理
            path: '/g28',
            name: 'g28',
            meta: { header: '健康管理' },
            component: g28,
        },
        { //消息中心
            path: '/m4',
            name: 'm4',
            meta: { header: '消息中心' },
            component: m4,
        },
        { //去评价
            path: '/topingjia',
            name: 'topingjia',
            component: topingjia,
        }, { //敬请期待
            path: '/CommingSoon',
            meta: { header: '敬请期待' },
            name: 'CommingSoon',
            component: CommingSoon,
        }, { //敬请期待
            path: '/todayCount',
            meta: { header: '今日统计' },
            name: 'todayCount',
            component: todayCount,
        },
    ],

})
var formaterTimeZone = function(data, TZ) {
    var timestamp = Date.parse(new Date());
    timestamp = timestamp / 1000 - TZ * 3600000;
    return new Date(timestamp);
}